<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="Cask Data, Inc." name="author" />
<meta content="Copyright © 2016-2018 Cask Data, Inc." name="copyright" />


    <meta name="git_release" content="6.1.1">
    <meta name="git_hash" content="05fbac36f9f7aadeb44f5728cea35136dbc243e5">
    <meta name="git_timestamp" content="2020-02-09 08:22:47 +0800">
    <title>Hub</title>

    <link rel="stylesheet" href="_static/cdap-bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" />
    <link rel="stylesheet" href="_static/css/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="_static/css/cdap-dynamicscrollspy-4.css" type="text/css" />
    <link rel="stylesheet" href="_static/css/jquery.mCustomScrollbar.css" type="text/css" />
    <link rel="stylesheet" href="_static/css/cdap-jquery.mCustomScrollbar.css" type="text/css" />
    <link rel="stylesheet" href="_static/css/abixTreeList-2.css" type="text/css" />
    <link rel="stylesheet" href="_static/cdap-bootstrap.css" type="text/css" />

    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '6.1.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>

    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="Cask Data Application Platform 6.1.1 Documentation" href="index.html" />
    <link rel="next" title="Cloudera" href="partners/cloudera/index.html" />
    <link rel="prev" title="Integrations" href="index.html" />
    <!-- block extrahead -->
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- block extrahead end -->

</head>
<body role="document">

<!-- block navbar -->
<div id="navbar" class="navbar navbar-inverse navbar-default navbar-fixed-top">
    <div class="container-fluid">
      <div class="row">
        <div class="navbar-header">
          <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
          <a class="navbar-brand" href="table-of-contents/../../index.html">
            <span><img alt="CDAP logo" src="_static/cdap_logo.svg"/></span>
          </a>

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>

          <div class="pull-right">
            <div class="dropdown version-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                role="button" aria-haspopup="true" aria-expanded="false">
                v 6.1.1 <span class="caret"></span>
              </a>
              <ul class="dropdown-menu">
                <li><a href="//docs.cdap.io/cdap/5.1.2/en/index.html">v 5.1.2</a></li>
                <li><a href="//docs.cdap.io/cdap/4.3.4/en/index.html">v 4.3.4</a></li>
              </ul>
            </div>
          </div>
          <form class="navbar-form navbar-right navbar-search" action="search.html" method="get">
            <div class="form-group">
              <div class="navbar-search-image material-icons"></div>
              <input type="text" name="q" class="form-control" placeholder="  Search" />
            </div>
            <input type="hidden" name="check_keywords" value="yes" />
            <input type="hidden" name="area" value="default" />
          </form>

          <div class="collapse navbar-collapse nav-collapse navbar-right navbar-navigation">
            <ul class="nav navbar-nav"><li class="docsite-nav-tab-container"><a class="docsite-nav-tab-link " href="table-of-contents/../../index.html">简介</a></li><li class="docsite-nav-tab-container"><a class="docsite-nav-tab-link current" href="table-of-contents/../../guides.html">手册</a></li><li class="docsite-nav-tab-container"><a class="docsite-nav-tab-link " href="table-of-contents/../../reference-manual/index.html">参考</a></li><li class="docsite-nav-tab-container"><a class="docsite-nav-tab-link " href="table-of-contents/../../faqs/index.html">帮助</a></li>
            </ul>
          </div>

        </div>
      </div>
    </div>
  </div><!-- block navbar end -->
<!-- block main content -->
<div class="main-container container">
  <div class="row"><div class="col-md-2">
      <div id="sidebar" class="bs-sidenav scrollable-y-outside" role="complementary">
<!-- theme_manual: integrations -->
<!-- theme_manual_highlight: guides -->
<!-- sidebar_title_link: table-of-contents/../../guides.html -->

  <div role="note" aria-label="manuals links"><h3><a href="table-of-contents/../../guides.html">Guides</a></h3>

    <ul class="this-page-menu">
      <li class="toctree-l1"><a href="table-of-contents/../../user-guide/index.html" rel="nofollow">用户手册</a>
      </li>
      <li class="toctree-l1"><a href="table-of-contents/../../developer-manual/index.html" rel="nofollow">开发手册</a>
      </li>
      <li class="toctree-l1"><a href="table-of-contents/../../admin-manual/index.html" rel="nofollow">管理手册</a>
      </li>
      <li class="toctree-l1"><b><a href="table-of-contents/../../integrations/index.html" rel="nofollow">集成手册</a></b>
      <nav class="pagenav">
      <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html"> Introduction</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"> Hub</a></li>
<li class="toctree-l1"><a class="reference internal" href="partners/cloudera/index.html"> Cloudera</a><ul>
<li class="toctree-l2"><a class="reference internal" href="partners/cloudera/ingesting.html"> Ingestion and Exploration</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="apache-sentry.html"> Apache Sentry</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache-ranger.html"> Apache Ranger</a></li>
<li class="toctree-l1"><a class="reference internal" href="hadoop-kms.html"> Apache Hadoop KMS</a></li>
<li class="toctree-l1"><a class="reference internal" href="jdbc.html"> CDAP JDBC Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="odbc.html"> CDAP ODBC Driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="pentaho.html"> Pentaho Data Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="squirrel.html"> SquirrelSQL</a></li>
</ul>
</nav>
      </li>
      <li class="toctree-l1"><a href="table-of-contents/../../examples-manual/index.html" rel="nofollow">最佳实践</a>
      </li>
    </ul>
  </div></div>
    </div><div class="col-md-8 content" id="main-content">
    
  <div class="section" id="hub">
<span id="id1"></span><h1>Hub<a class="headerlink" href="#hub" title="Permalink to this headline">🔗</a></h1>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">🔗</a></h2>
<p>The Hub allows CDAP users to create and update CDAP artifacts, applications, and
datasets using simple wizards. Instead of building code, deploying artifacts, and
configuring applications, users can simply point and click. This allows users of varying
technical skill the ability to deploy and run common use-cases in a self-service manner.</p>
<p>The Hub allows system administrators to distribute re-usable applications, data,
and code to all CDAP users in their organization. Though there is currently no method for
publishing packages to the public Cask-hosted Hub, administrators can host their own
Hub and then configure their CDAP instances to use their own Hub instead of the
public Hub.</p>
<p class="rubric">Terminology</p>
<p><strong>Package:</strong> A collection of entities (artifacts, applications, datasets, streams,
configuration) to add to CDAP. A package is identified by a name and version, and can be
tagged with one or more categories. Each package must contain a specification, and may
contain resources.</p>
<p><strong>Package Specification:</strong> Defines metadata about the package, such as display label,
description, creation time, and CDAP compatibilities. It contains a list of actions that
must be performed to install the package. Each action corresponds to a wizard in the
installation process.</p>
<p><strong>Package Resource:</strong> A file that can be used during the installation process. It can be a
configuration file, a JAR, or data that should be loaded into a dataset. Resources are
referenced by name in the actions defined in the package specification.</p>
<p><strong>Catalog:</strong> The catalog is a list of all the packages in the Hub. The catalog
contains metadata about each package.</p>
<p class="rubric">Architecture</p>
<p>The Hub is a service that is separate from a CDAP instance. Each CDAP UI instance
can be configured to read from a separate Hub instance. By default, the UI points
to the public Cask-hosted Hub. During package installation, the UI will make calls to
the Hub and to a CDAP Router instance to create or update various CDAP entities.
For example, a package may contain an action to create a stream, and then load data to a
stream. The Hub UI will interact with the CDAP RESTful APIs to create the stream,
then fetch the data from the Hub and add it to the CDAP stream through the CDAP
RESTful APIs.</p>
<p>A Hub is essentially just a server that serves static package specifications and
resources. As such, administrators can easily set up their own Hub instances in the same way
they would serve any static content. For example, an Apache web server can be placed on
top of a local directory structure that matches the expected Hub directory structure.</p>
</div>
<div class="section" id="hub-http-restful-api">
<span id="hub-api"></span><h2>Hub HTTP RESTful API<a class="headerlink" href="#hub-http-restful-api" title="Permalink to this headline">🔗</a></h2>
<p>The Hub HTTP RESTful APIs are simply a contract about the directory structure of the Hub.
All APIs are relative to a base path. For example, the base path for the public Cask-hosted Hub
is <code class="docutils literal notranslate"><span class="pre">hub.cdap.io</span></code>.</p>
<p>The directory structure must be:</p>
<pre class="literal-block">
&lt;base&gt;/v2/packages.json
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/icon.png
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json.asc
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource1&gt;
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource1&gt;.asc
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource2&gt;
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource2&gt;.asc
...
</pre>
<p>All methods or endpoints described in this API have a base URL (typically
<code class="docutils literal notranslate"><span class="pre">http://&lt;host&gt;:11015</span></code> or <code class="docutils literal notranslate"><span class="pre">https://&lt;host&gt;:10443</span></code>) that precedes the resource
identifier, as described in the <span class="xref std std-ref">RESTful API Conventions</span>.
These methods return a status code, as listed in the <span class="xref std std-ref">RESTful API  Status Codes</span>.</p>
<div class="section" id="get-hub-catalog">
<span id="hub-get-catalog"></span><h3>Get Hub Catalog<a class="headerlink" href="#get-hub-catalog" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve a list of available packages, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages.json
</pre>
<p>This will return a JSON array that lists each package and its metadata:</p>
<div class="highlight container">
<pre class="literal-block">
[
  {
    &quot;name&quot;: &quot;access-log&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;Sample access logs in Combined Log Format (CLF)&quot;,
    &quot;label&quot;: &quot;Access Log Sample&quot;,
    &quot;author&quot;: &quot;Cask&quot;,
    &quot;org&quot;: &quot;Cask Data, Inc.&quot;,
    &quot;cdapVersion&quot;: &quot;[6.1.1,6.2.1)&quot;,
    &quot;created&quot;: 1473901763,
    &quot;beta&quot;: false,
    &quot;categories&quot;: [ &quot;datapack&quot; ]
  },
  {
    &quot;name&quot;: &quot;bulk-data-transfer&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;Moving data from structured data source such as a traditional relational
                  database into Hadoop is very common in building Data Lakes. This
                  data application allows you to set-up periodic full data dumps from
                  RDBMS into Hadoop cluster. Data on Hadoop is stored as DB table
                  snapshot. Supports other relational databases.&quot;,
    &quot;label&quot;: &quot;Bulk Data Transfer&quot;,
    &quot;author&quot;: &quot;Cask&quot;,
    &quot;org&quot;: &quot;Cask Data, Inc.&quot;,
    &quot;cdapVersion&quot;: &quot;[6.1.1,6.2.1)&quot;,
    &quot;created&quot;: 1473901763,
    &quot;beta&quot;: false,
    &quot;license&quot;: &quot;license.txt&quot;,
    &quot;categories&quot;: [ &quot;usecase&quot; ]
  },
  ...
]
</pre>
</div>
</div>
<div class="section" id="get-package-specification">
<h3>Get Package Specification<a class="headerlink" href="#get-package-specification" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve a package specification, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json
</pre>
<p>This will return a JSON object that contains metadata about the package,
and a list of actions required to install the package:</p>
<div class="highlight container">
<pre class="literal-block">
{
  &quot;label&quot;: &quot;Bulk Data Transfer&quot;,
  &quot;description&quot;: &quot;Moving data from structured data source such as a traditional relational
                database into Hadoop is very common in building Data Lakes. This data
                application allows you to set-up periodic full data dumps from RDBMS
                into Hadoop cluster. Data on Hadoop is stored as DB table snapshot.
                Supports other relational databases.&quot;,
  &quot;author&quot;: &quot;Cask&quot;,
  &quot;org&quot;: &quot;Cask Data, Inc.&quot;,
  &quot;created&quot;: 1473901763,
  &quot;categories&quot;: [ &quot;usecase&quot; ],
  &quot;beta&quot;: false,
  &quot;license&quot;: &quot;license.txt&quot;,
  &quot;cdapVersion&quot;: &quot;[6.1.1,6.2.1)&quot;,
  &quot;actions&quot;: [
    {
      &quot;type&quot;: &quot;informational&quot;,
      &quot;label&quot;: &quot;Download MySQL JDBC Driver&quot;,
      &quot;arguments&quot;: [
        {
          &quot;name&quot;: &quot;steps&quot;,
          &quot;value&quot;: [
            &quot;Download the ZIP file from MySQL at <a class="reference external" href="https://dev.mysql.com/downloads/file/?id=462850">https://dev.mysql.com/downloads/file/?id=462850</a>&quot;,
            &quot;Unzip the file&quot;,
            &quot;In the next step, upload the 'mysql-connector-java-5.1.39-bin.jar' file from the ZIP&quot;
          ]
        }
      ]
    },
    {
      &quot;type&quot;: &quot;create_artifact&quot;,
      &quot;label&quot;: &quot;MySQL Driver Plugin&quot;,
      &quot;arguments&quot;: [
        {
          &quot;name&quot;: &quot;name&quot;,
          &quot;value&quot;: &quot;mysql-connector-java&quot;
        },
        {
          &quot;name&quot;: &quot;version&quot;,
          &quot;value&quot;: &quot;5.1.39&quot;
        },
        {
          &quot;name&quot;: &quot;scope&quot;,
          &quot;value&quot;: &quot;user&quot;
        },
        {
          &quot;name&quot;: &quot;config&quot;,
          &quot;value&quot;: &quot;mysql-connector-java.json&quot;
        }
      ]
    },
    {
      &quot;type&quot;: &quot;create_pipeline&quot;,
      &quot;label&quot;: &quot;Bulk Data Transfer Pipeline&quot;,
      &quot;arguments&quot;: [
        {
          &quot;name&quot;: &quot;artifact&quot;,
          &quot;value&quot;: {
            &quot;scope&quot;: &quot;system&quot;,
            &quot;name&quot;: &quot;cdap-data-pipeline&quot;,
            &quot;version&quot;: &quot;6.1.1&quot;
          }
        },
        {
          &quot;name&quot;: &quot;name&quot;,
          &quot;value&quot;: &quot;bulkDataTransfer&quot;,
          &quot;canModify&quot;: true
        },
        {
          &quot;name&quot;: &quot;config&quot;,
          &quot;value&quot;: &quot;pipeline.json&quot;
        }
      ]
    }
  ]
}
</pre>
</div>
</div>
<div class="section" id="action-specification">
<h3>Action Specification<a class="headerlink" href="#action-specification" title="Permalink to this headline">🔗</a></h3>
<p>There are several supported actions, each with its own specification.
If an action fails for any reason, actions completed before it are
not rolled back. However, each action is idempotent, which means the
installation can simply be retried once the underlying cause of the failure has
been fixed.</p>
<p>Each action contains a label, type, and arguments:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;display-label&gt;&quot;</span><span class="p">,</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;action-type&gt;&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;argument-name&gt;&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;argument-value&gt;&quot;</span><span class="p">,</span>
      <span class="nt">&quot;canModify&quot;</span><span class="p">:</span> <span class="s2">&quot;true | false (defaults to false)&quot;</span>
    <span class="p">},</span>
    <span class="c">...</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The label is a short description that will be displayed to users during the install process.
Some arguments will reference package resources.</p>
<p>These actions are available:</p>
<ul class="simple">
<li><a class="reference internal" href="#informational">informational</a></li>
<li><a class="reference internal" href="#create-driver-artifact">create_driver_artifact</a></li>
<li><a class="reference internal" href="#create-plugin-artifact">create_plugin_artifact</a></li>
<li><a class="reference internal" href="#one-step-deploy-plugin">one_step_deploy_plugin</a></li>
<li><a class="reference internal" href="#create-stream">create_stream</a></li>
<li><a class="reference internal" href="#load-datapack">load_datapack</a></li>
<li><a class="reference internal" href="#deploy-app">deploy_app</a></li>
<li><a class="reference internal" href="#one-step-deploy-app">one_step_deploy_app</a></li>
<li><a class="reference internal" href="#create-pipeline">create_pipeline</a></li>
<li><a class="reference internal" href="#create-pipeline-draft">create_pipeline_draft</a></li>
</ul>
<p>Descriptions of each action type and their supported arguments follow.</p>
<div class="section" id="informational">
<h4>informational<a class="headerlink" href="#informational" title="Permalink to this headline">🔗</a></h4>
<p>Displays information for the user. Does not perform any actions against the CDAP RESTful APIs.
This can be used, for example, to tell the user to download a JAR from a 3rd-party website.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">steps</span></code></td>
<td>JSON array of strings listing steps the user should take</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;informational&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;Download MySQL JDBC Driver&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;steps&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="p">[</span>
        <span class="s2">&quot;Download the ZIP file from Oracle at https://dev.mysql.com/downloads/file/?id=462850&quot;</span><span class="p">,</span>
        <span class="s2">&quot;Unzip the file&quot;</span><span class="p">,</span>
        <span class="s2">&quot;In the next step, upload the &#39;mysql-connector-java-5.1.39-bin.jar&#39; file from the ZIP&quot;</span>
      <span class="p">]</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="create-driver-artifact">
<h4>create_driver_artifact<a class="headerlink" href="#create-driver-artifact" title="Permalink to this headline">🔗</a></h4>
<p>Creates a CDAP artifact containing a third-party JDBC Driver.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Artifact name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">jar</span></code></td>
<td>JAR resource containing the artifact</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">scope</span></code></td>
<td>Artifact scope</td>
<td>No</td>
<td><code class="docutils literal notranslate"><span class="pre">user</span></code></td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">version</span></code></td>
<td>Artifact version</td>
<td>No</td>
<td>Version contained in the JAR manifest</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">config</span></code></td>
<td>Package resource containing artifact parents, plugins, and properties</td>
<td>No</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;create_driver_artifact&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;MySQL Driver Plugin&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;mysql-connector-java&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;scope&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;user&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;version&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;5.1.39&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;config&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;mysql-connector-java.json&quot;</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">mysql-connector-java.json</span></code> is a package resource with content such as:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;parents&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="s2">&quot;system:cdap-data-pipeline[3.0.0,10.0.0]&quot;</span><span class="p">,</span>
    <span class="s2">&quot;system:cdap-data-streams[3.0.0,10.0.0]&quot;</span>
  <span class="p">],</span>
  <span class="nt">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span> <span class="p">:</span> <span class="s2">&quot;mysql&quot;</span><span class="p">,</span>
      <span class="nt">&quot;type&quot;</span> <span class="p">:</span> <span class="s2">&quot;jdbc&quot;</span><span class="p">,</span>
      <span class="nt">&quot;className&quot;</span> <span class="p">:</span> <span class="s2">&quot;com.mysql.jdbc.Driver&quot;</span><span class="p">,</span>
      <span class="nt">&quot;description&quot;</span> <span class="p">:</span> <span class="s2">&quot;Plugin for MySQL JDBC driver&quot;</span>
    <span class="p">}</span>
  <span class="p">],</span>
  <span class="nt">&quot;properties&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="create-plugin-artifact">
<h4>create_plugin_artifact<a class="headerlink" href="#create-plugin-artifact" title="Permalink to this headline">🔗</a></h4>
<p>Creates a CDAP artifact that contains plugins that extend another artifact. For example,
it may contain plugins for CDAP pipelines. Prompts the user to upload the artifact JAR.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Artifact name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">scope</span></code></td>
<td>Artifact scope</td>
<td>No</td>
<td><code class="docutils literal notranslate"><span class="pre">user</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">version</span></code></td>
<td>Artifact version</td>
<td>No</td>
<td>Version contained in the JAR manifest</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">config</span></code></td>
<td>Package resource containing artifact parents, plugins, and properties</td>
<td>No</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;create_plugin_artifact&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;CDAP Pipeline Solr Plugin&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;solrsearch-plugins&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;scope&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;user&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;version&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;1.5.0&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;config&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;solrsearch-plugins.json&quot;</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">solrsearch-plugins.json</span></code> is a package resource with content such as:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;parents&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="s2">&quot;system:cdap-data-pipeline[3.0.0,10.0.0]&quot;</span><span class="p">,</span>
    <span class="s2">&quot;system:cdap-data-streams[3.0.0,10.0.0]&quot;</span>
  <span class="p">],</span>
  <span class="nt">&quot;properties&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="one-step-deploy-plugin">
<h4>one_step_deploy_plugin<a class="headerlink" href="#one-step-deploy-plugin" title="Permalink to this headline">🔗</a></h4>
<p>Deploys a CDAP artifact that contains plugins that extend another artifact.
For example, it may contain plugins for CDAP pipelines. It deploys the
artifact without prompting users.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Artifact name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">jar</span></code></td>
<td>JAR resource containing the artifact</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">scope</span></code></td>
<td>Artifact scope</td>
<td>No</td>
<td><code class="docutils literal notranslate"><span class="pre">user</span></code></td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">version</span></code></td>
<td>Artifact version</td>
<td>No</td>
<td>Version contained in the JAR manifest</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">config</span></code></td>
<td>Package resource containing artifact parents, plugins, and properties</td>
<td>No</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;one_step_deploy_plugin&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;Deploy CDAP Pipeline Solr Plugin&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;solrsearch-plugins&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;jar&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;solrsearch-plugins-1.5.0.jar&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;scope&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;user&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;version&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;1.5.0&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;config&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;solrsearch-plugins.json&quot;</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">solrsearch-plugins.json</span></code> is a package resource with content such as:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;parents&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="s2">&quot;system:cdap-data-pipeline[3.0.0,10.0.0]&quot;</span><span class="p">,</span>
    <span class="s2">&quot;system:cdap-data-streams[3.0.0,10.0.0]&quot;</span>
  <span class="p">],</span>
  <span class="nt">&quot;properties&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="create-stream">
<h4>create_stream<a class="headerlink" href="#create-stream" title="Permalink to this headline">🔗</a></h4>
<p>Creates a CDAP stream.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Stream name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">description</span></code></td>
<td>Stream description</td>
<td>No</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">properties</span></code></td>
<td>Package resource containing stream properties such as format, TTL, and notification threshold</td>
<td>No</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;create_stream&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;Labeled SMS Texts&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;labeledSMS&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;description&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;SMS texts that have been labeled as spam or not&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;properties&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;properties.json&quot;</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">properties.json</span></code> is a package resource with content such as:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;ttl&quot;</span><span class="p">:</span> <span class="mi">9223372036854775</span><span class="p">,</span>
  <span class="nt">&quot;format&quot;</span><span class="p">:</span> <span class="p">{</span>
    <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;tsv&quot;</span><span class="p">,</span>
    <span class="nt">&quot;schema&quot;</span><span class="p">:</span> <span class="p">{</span>
      <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;record&quot;</span><span class="p">,</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;labeledSMS&quot;</span><span class="p">,</span>
      <span class="nt">&quot;fields&quot;</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;label&quot;</span><span class="p">,</span> <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;string&quot;</span> <span class="p">},</span>
        <span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;message&quot;</span><span class="p">,</span> <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;string&quot;</span> <span class="p">}</span>
      <span class="p">]</span>
    <span class="p">}</span>
  <span class="p">},</span>
  <span class="nt">&quot;notification.threshold.mb&quot;</span><span class="p">:</span> <span class="mi">1024</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="load-datapack">
<h4>load_datapack<a class="headerlink" href="#load-datapack" title="Permalink to this headline">🔗</a></h4>
<p>Loads a datapack into a CDAP entity, such as a stream or dataset.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>The name of the CDAP entity to load the data into</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">files</span></code></td>
<td>A JSON array of package resources to load into the CDAP entity</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;load_datapack&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;Labeled SMS Text Data&quot;</span><span class="p">,</span>
  <span class="nt">&quot;arguments&quot;</span><span class="p">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;labeledSMS&quot;</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;files&quot;</span><span class="p">,</span>
      <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="s2">&quot;texts1.tsv&quot;</span><span class="p">,</span> <span class="s2">&quot;texts2.tsv&quot;</span> <span class="p">]</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">texts1.tsv</span></code> and <code class="docutils literal notranslate"><span class="pre">texts2.tsv</span></code> are package resources containing the data to load into the stream.</p>
</div>
<div class="section" id="deploy-app">
<h4>deploy_app<a class="headerlink" href="#deploy-app" title="Permalink to this headline">🔗</a></h4>
<p>Deploys a CDAP application by prompting the user to upload the application JAR.
Does not take any arguments.</p>
<p>Example action:</p>
<div class="highlight container">
<div class="highlight-json-ellipsis notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nt">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;deploy_app&quot;</span><span class="p">,</span>
  <span class="nt">&quot;label&quot;</span><span class="p">:</span> <span class="s2">&quot;Word Count Example App&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="one-step-deploy-app">
<h4>one_step_deploy_app<a class="headerlink" href="#one-step-deploy-app" title="Permalink to this headline">🔗</a></h4>
<p>Deploys a CDAP application.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">jar</span></code></td>
<td>JAR resource containing the application</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight container">
<pre class="literal-block">
{
  &quot;type&quot;: &quot;one_step_deploy_app&quot;,
  &quot;label&quot;: &quot;Deploy Word Count Example App&quot;,
  &quot;arguments&quot;: [
    {
      &quot;name&quot;: &quot;jar&quot;,
      &quot;value&quot;: &quot;WordCount-6.1.1.jar&quot;,
    }
  ]
}
</pre>
</div>
</div>
<div class="section" id="create-pipeline">
<h4>create_pipeline<a class="headerlink" href="#create-pipeline" title="Permalink to this headline">🔗</a></h4>
<p>Creates a CDAP pipeline.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">artifact</span></code></td>
<td>JSON Object containing the pipeline’s artifact scope, name, and version</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Pipeline name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">config</span></code></td>
<td>Package resource containing the pipeline config</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight container">
<pre class="literal-block">
{
  &quot;type&quot;: &quot;create_pipeline&quot;,
  &quot;label&quot;: &quot;Omniture Hits Pipeline&quot;,
  &quot;arguments&quot;: [
    {
      &quot;name&quot;: &quot;artifact&quot;,
      &quot;value&quot;: {
        &quot;scope&quot;: &quot;system&quot;,
        &quot;name&quot;: &quot;cdap-data-pipeline&quot;,
        &quot;version&quot;: &quot;6.1.1&quot;
      }
    },
    {
      &quot;name&quot;: &quot;name&quot;,
      &quot;value&quot;: &quot;omnitureHitsPipeline&quot;,
      &quot;canModify&quot;: true
    },
    {
      &quot;name&quot;: &quot;config&quot;,
      &quot;value&quot;: &quot;pipeline.json&quot;
    }
  ]
}
</pre>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">pipeline.json</span></code> is a package resource containing the pipeline config.</p>
</div>
<div class="section" id="create-pipeline-draft">
<h4>create_pipeline_draft<a class="headerlink" href="#create-pipeline-draft" title="Permalink to this headline">🔗</a></h4>
<p>Creates a CDAP pipeline draft. Similar to <a class="reference internal" href="#create-pipeline">create_pipeline</a>, except that the pipeline
will not be published. Instead, a draft will be created that the user can then modify.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="50%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Argument</th>
<th class="head">Description</th>
<th class="head">Required?</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">artifact</span></code></td>
<td>JSON Object containing the pipeline’s artifact scope, name, and version</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">name</span></code></td>
<td>Pipeline name</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">config</span></code></td>
<td>Package resource containing the pipeline config</td>
<td>Yes</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
<p>Example action:</p>
<div class="highlight container">
<pre class="literal-block">
{
  &quot;type&quot;: &quot;create_pipeline_draft&quot;,
  &quot;label&quot;: &quot;Omniture Hits Pipeline&quot;,
  &quot;arguments&quot;: [
    {
      &quot;name&quot;: &quot;artifact&quot;,
      &quot;value&quot;: {
        &quot;scope&quot;: &quot;system&quot;,
        &quot;name&quot;: &quot;cdap-data-pipeline&quot;,
        &quot;version&quot;: &quot;6.1.1&quot;
      }
    },
    {
      &quot;name&quot;: &quot;name&quot;,
      &quot;value&quot;: &quot;omnitureHitsPipeline&quot;,
      &quot;canModify&quot;: true
    },
    {
      &quot;name&quot;: &quot;config&quot;,
      &quot;value&quot;: &quot;pipeline.json&quot;
    }
  ]
}
</pre>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">pipeline.json</span></code> is a package resource containing the pipeline config.</p>
</div>
</div>
<div class="section" id="get-package-specification-signature">
<h3>Get Package Specification Signature<a class="headerlink" href="#get-package-specification-signature" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve the signature for a package specification, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json.asc
</pre>
<p>The signature is a PGP signature that can be used to validate a package resource. The
package publisher signs the package specification with their private key. The signature can
then be used in conjunction with the publisher’s public key to validate that the specification
was signed by the publisher.</p>
</div>
<div class="section" id="get-package-resource">
<h3>Get Package Resource<a class="headerlink" href="#get-package-resource" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve a package resource, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource-name&gt;
</pre>
<p>The resource can contain arbitrary data. They can be artifact JARs, configuration files,
sample data, or anything else that a package action may require.</p>
</div>
<div class="section" id="get-package-resource-signature">
<h3>Get Package Resource Signature<a class="headerlink" href="#get-package-resource-signature" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve the signature for a package resource, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource-name&gt;.asc
</pre>
<p>The signature is a PGP signature that can be used to validate a package resource. The
package publisher signs the package resource with their private key. The signature can
then be used in conjunction with the publisher’s public key to validate that a package
resource was signed by the publisher.</p>
</div>
<div class="section" id="get-package-icon">
<h3>Get Package Icon<a class="headerlink" href="#get-package-icon" title="Permalink to this headline">🔗</a></h3>
<p>To retrieve the icon for a package, submit an HTTP GET request:</p>
<pre class="literal-block">
GET /v2/packages/&lt;package-name&gt;/&lt;version&gt;/icon.png
</pre>
</div>
</div>
<div class="section" id="hosting-a-custom-hub">
<h2>Hosting a Custom Hub<a class="headerlink" href="#hosting-a-custom-hub" title="Permalink to this headline">🔗</a></h2>
<p>The Hub APIs are simply a contract about the directory structure of the Hub.</p>
<p>The directory structure must be:</p>
<pre class="literal-block">
&lt;base&gt;/v2/packages.json
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/icon.png
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/spec.json.asc
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource1&gt;
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource1&gt;.asc
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource2&gt;
&lt;base&gt;/v2/packages/&lt;package-name&gt;/&lt;version&gt;/&lt;resource2&gt;.asc
...
</pre>
<p>As such, hosting a custom Hub can be done by setting up a server that follows the same
path structure.</p>
<p>One possible setup is to keep your packages in a source control repository whose directory
structure matches the one required by the Hub. The repository can be checked out onto one or
more machines, with an Apache server configured to serve content from that directory. A tool
can be run to create the catalog file from all the package specifications, and to create all
the signature files.</p>
<p>Another possible setup is to serve the Hub catalog and packages from Amazon S3.</p>
<p>To configure the location of the Hub, when you are using a custom Hub instead
of the public Hub, configure the property <code class="docutils literal notranslate"><span class="pre">market.base.url</span></code> in the
<code class="docutils literal notranslate"><span class="pre">cdap-site.xml</span></code> file to point to the location of your custom Hub. See the
<a class="reference external" href="../../admin-manual/appendices/cdap-site.html#appendix-cdap-default-market" title="(in Cask Data Application Platform v6.1.1)"><span class="xref std std-ref">Hub</span></a> section in the <a class="reference external" href="../../admin-manual/appendices/cdap-site.html#appendix-cdap-site-xml" title="(in Cask Data Application Platform v6.1.1)"><span class="xref std std-ref">Appendix</span></a> of the <a class="reference external" href="../../admin-manual/index.html#admin-index" title="(in Cask Data Application Platform v6.1.1)"><span class="xref std std-ref">管理手册</span></a>
for details on configuring the file.</p>
</div>
</div>

</div>
    <div class="col-md-2">
      <div id="right-sidebar" class="bs-sidenav scrollable-y" role="complementary">
        <div id="localtoc-scrollspy">
        </div>
      </div>
    </div></div>
</div>
<!-- block main content end -->
<!-- block footer -->
<footer class="footer">
      <div class="container">
        <div class="row">
          <div class="col-md-2 footer-left"><a title="Integrations" href="index.html" />Previous</a></div>
          <div class="col-md-8 footer-center"><a class="footer-tab-link" href="table-of-contents/../../reference-manual/licenses/index.html">Copyright</a> &copy; 2014-2020 Cask Data, Inc.&bull; <a class="footer-tab-link" href="//docs.cask.co/cdap/6.1.1/cdap-docs-6.1.1-web.zip" rel="nofollow">Download</a> an archive or
<a class="footer-tab-link" href="//docs.cask.co/cdap">switch the version</a> of the documentation
          </div>
          <div class="col-md-2 footer-right"><a title="Cloudera" href="partners/cloudera/index.html" />Next</a></div>
        </div>
      </div>
    </footer>
<!-- block footer end -->
<script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script><script type="text/javascript" src="_static/js/bootstrap-sphinx.js"></script><script type="text/javascript" src="_static/js/abixTreeList-2.js"></script><script type="text/javascript" src="_static/js/cdap-dynamicscrollspy-4.js"></script><script type="text/javascript" src="_static/js/cdap-version-menu.js"></script><script type="text/javascript" src="_static/js/copy-to-clipboard.js"></script><script type="text/javascript" src="_static/js/jquery.mousewheel.min.js"></script><script type="text/javascript" src="_static/js/jquery.mCustomScrollbar.js"></script><script type="text/javascript" src="_static/js/js.cookie.js"></script><script type="text/javascript" src="_static/js/tabbed-parsed-literal-0.2.js"></script><script type="text/javascript" src="_static/js/cdap-onload-javascript.js"></script><script type="text/javascript" src="_static/js/cdap-version-menu.js"></script>
    <script src="https://cdap.gitee.io/docs/cdap/json-versions.js"/></script>
  </body>
</html>